package com.itheima.apis.article;

import com.heima.model.article.Dtos.ArticleDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

//添加降级处理类,反馈提示信息  fallback = IArticleClientFallback.class 回调函数
//@FeignClient( value = "leadnews-article",fallback = IArticleClientFallback.class)
@FeignClient(value = "leadnews-article")
public interface IArticleClient {
    //暴露接口远程调用
    @PostMapping("/api/v1/article/save")
    ResponseResult saveArticle(@RequestBody ArticleDto dto) throws Exception;
}
